<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?php $this->load->view('include/html_head')?>
</head>
<body>
<div id="wrapper">
	<?php $this->load->view('include/header')?>
	<?php $this->load->view('include/menu')?>
	<div id="page">
		<div id="content">
			<!--幻灯开始 -->
			<style>
			.nivoSlider {
			    position:relative;
			    width:350px; /* Change this to your images width */
			    height:260px; /* Change this to your images height */
			    background:url(/images/icon/loading.gif) no-repeat 50% 50%;
			}
			</style>
               <div style='margin-bottom: 40px'>
	               <div class="slider-wrapper theme-default my_theme_default">
			            <div class="ribbon"></div>
			            <div id="slider" class="nivoSlider">
			            <?php if (isset($latest_news_pic)):?>
			            <?php foreach ($latest_news_pic as $v):?>
			            	<a href="<?php echo base_url()?>index.php/frontend/<?php echo ($v['category_id'] == SOCIETY_UCID) ? SOCIETY : ASSOCIATION ?>/news_detail/<?php echo $v['id']?>">
			            	<img src="<?php echo $v['pic_path']?>" alt="" title="<?php echo $v['title']?>"/>
			            	</a>
			            <?php endforeach;?>
			            <?php endif;?>
			            </div>
			        </div>
		        </div>
			    <script type="text/javascript">
			    $(window).load(function() {
			        $('#slider').nivoSlider({
			        	//controlNav: false,
			        	//captionOpacity: 0.5
					});
			    });
			    </script>
                <!--幻灯结束 -->
                
                <!-- 最新资讯开始 -->
                <div class='latest_news'>
                <h2>最新资讯</h2>
                <ul>
                	<?php if (!empty($latest_news)):?>
                	<?php foreach ($latest_news as $v):?>
                	<li>
                		<?php if ($v['category_id'] == SOCIETY_UCID):?>
                		<a title='<?php echo "【" . $v['author_abbr'] . "】" . $v['title']?>' href='<?php echo SOCIETY_NEWS_DETAIL_PATH . $v['id']?>'>
                		<?php echo "【" . $v['author_abbr'] . "】"?><?php $length = mb_strlen("【" . $v['author_abbr'] . "】"); echo ellipsize($v['title'], 16 - $length, .5)?>
                		</a>
                		<?php else :?>
                		<a title='【社联】<?php echo $v['title']?>' href='<?php echo ASSOCIATION_NEWS_DETAIL_PATH . $v['id']?>'>
                		【社联】<?php echo ellipsize($v['title'], 12, .5)?>
                		</a>
                		<?php endif;?>
                		<br /><span><?php echo ellipsize($v['contents'], 40, 1)?></span>
                	</li>
                	<?php endforeach;?>
                	<?php endif;?>
                </ul>
                </div>
                <!-- 最新资讯结束 -->
                
                <!-- 最新活动宣传Banner开始 -->
            	<script type="text/javascript" src="<?php echo PLUGIN_ROTATER ?>scripts/swfobject/swfobject.js"></script>
			    <script type="text/javascript">
			      var flashvars = {};
			      flashvars.cssSource = "<?php echo PLUGIN_ROTATER ?>piecemaker.css";
			      flashvars.xmlSource = "<?php echo PLUGIN_ROTATER ?>piecemaker.xml";
			      var params = {};
			      params.play = "true";
			      params.menu = "false";
			      params.scale = "showall";
			      params.wmode = "transparent";
			      params.allowfullscreen = "true";
			      params.allowscriptaccess = "always";
			      params.allownetworking = "all";
			      swfobject.embedSWF('<?php echo PLUGIN_ROTATER ?>piecemaker.swf', 'piecemaker', '1000', '600', '10', null, flashvars, params, null);
			    </script>
			    <div id="piecemaker"></div>
			    <!-- 最新活动宣传Banner结束 -->
			    
			<div class="post">
				<p class="meta"><img src='/images/news.png' />社联新闻 - News of Association</p>
				<div class="entry">
					<ul>
					<?php if (!empty($association_news)):?>
					<?php foreach ($association_news as $v):?>
					   <li><span>[<?php echo date("Y/m/d", $v['create_time'])?>]</span>&nbsp;&nbsp;<a title='<?php echo $v['title']?>' href="<?php echo ASSOCIATION_NEWS_DETAIL_PATH . $v['id']?>"><?php echo $v['title']?></a></li>
					<?php endforeach;?>
					<?php endif;?>
					</ul>
					<p class="links"><a href='<?php echo MENU_TAB_D_PATH?>' class="more">查看更多</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#" class="comments">新闻总计 (<?php echo $association_news_count?>)</a></p>
				</div>
				
				<p class="meta"><img src='/images/news.png' />社团动态 - Dynamics of Societies</p>
				<div class="entry">
					<ul>
					<?php if (!empty($society_news)):?>
					<?php foreach ($society_news as $v):?>
						<li>
							<span>[<?php echo date("Y/m/d", $v['create_time'])?>]</span>
							<span><a title='<?php echo $v['author_abbr'] . "主页"?>' href='<?php echo SOCIETY_HOME_PATH . $v['author_id']?>'><?php echo "【" . $v['author_abbr'] . "】"?></a></span>
							<a title='<?php echo '【' . $v['author_abbr'] . '】' . $v['title']?>' href='<?php echo SOCIETY_NEWS_DETAIL_PATH . $v['id']?>'><?php echo $v['title']?></a>
						</li>
					<?php endforeach;?>
					<?php endif;?>
					</ul>
					<p class="links"><a href='<?php echo MENU_TAB_E_PATH?>' class="more">查看更多</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#" class="comments">新闻总计 (<?php echo $society_news_count?>)</a></p>
				</div>
			</div>
			<?php if (SITE_CLOSE == 1):?>
		 	<div style='overflow: hidden;' id='site_close_dialog' title='本站点已关闭'>
		 	<span class='tip'>关闭原因：<?php echo SITE_CLOSE_REASON?></span>
			</div>
			<script>
			$("#site_close_dialog").dialog({
				resizable: false,
				draggable: false,
				modal: true,
				//width: 373,
				//height: 330,
				buttons: {
					"返回": function() {
						history.back(-1);
					}
				}
			});
			$("a.ui-dialog-titlebar-close").hide();
			</script>
		 	<?php endif;?>
			<div style="clear: both;">&nbsp;</div>
		</div>
		<!-- end #content -->
		<?php $this->load->view('include/side_bar')?>
		<div style="clear: both;">&nbsp;</div>
	</div>
	<!-- end #page -->
</div>
<?php $this->load->view('include/footer_content')?>
<?php $this->load->view('include/footer')?>
</body>
</html>
